It is the custom of the pious to spend the night in worship. By worshipping Almighty Allah in the night, one tires of sins and through its blessings, those who do so will be cured of bodily ailments as well. As mentioned in this Hadith:
Translation: It is narrated on the authority of Hadhrat Bilal (May Allah be well pleased with him) that the Holy Prophet (Sallallahu alaihi wa sallam) said: You make worship of the night compulsory for yourself! As that has been the custom of the pious folk before you. Indeed! Worship of the night is a means of attaining the closeness of Allah Most High, an expiation for sins and an effective means of driving away disease from the body. (Jame’ Tirmidhi, Hadith No. 3895; At Targheeb Wat Tarheeb, Hadith No. 557)